<#include "/common/freemarker/include_header.ftl">
<div class="panel panel-primary">
    <div class="panel-heading">
          邮件发送通知样例
    </div>
    <div class="panel-body">

			邮箱地址<input id=to name=to style="width:400px;" value="<#list  rhs["userList"] as u><#if u.email?exists&& u.email!=""><#if u_index!=0>;</#if>${u.email?if_exists}<#else>;空-${u.name?if_exists}</#if></#list>" ></input>
			<br><br>标题<input id=subject name=subject style="width:400px;" value=""></input>
			<br><br>
			<textarea id="textarea" name="content"  ></textarea><br>
			<p align=center> <input type="button" class="button" value="发送" onclick="javascript:data_submit();"/></p>
       		<#-->
	       <p><a id=smtp href="ea_smtp_menu_smtp.do"   target=_blank>邮箱发送服务器有后台配置界面：</a></p>
	       -->
    </div>
    
</div>

		    
	
	<script src="<@context/>common/ckeditor_4.5.4_full/ckeditor/ckeditor.js"></script>
    <script>
        CKEDITOR.replace( 'textarea' ,{
            language: 'zh-cn',
            height: 260,
            toolbarGroups : [
				{ name: 'editing', groups: [ 'basicstyles', 'links' ] },
				{ name: 'undo' },
				{ name: 'clipboard', groups: [ 'selection', 'clipboard' ] },
				{ name: 'about' }
			]
	
        });
        
 	function data_submit(){
	 
	   var content_value =escape(encodeURIComponent(CKEDITOR.instances.textarea.getData('content')));
	   var to_value=escape(encodeURIComponent(document.getElementById('to').value));
	   var subject_value=escape(encodeURIComponent(document.getElementById('subject').value));
        //alert("to="+to_value+"&subject="+subject_value+"&content="+content_value);
	    $.ajax({
		         type:"POST",
		         url: "<@context/>common/notify/submit_send_mail.do",
		         data:"to="+to_value+"&subject="+subject_value+"&content="+content_value,
		         cache: false,
		         success: function(html){
		          alert(html);
		         }
		  });  	    
	}       
         
    </script>
</div>
